package com.kpijavatraining6.module2.actionTools;

import com.kpijavatraining6.module2.questions.QuestionStructure;

import java.io.BufferedWriter;

/**
 * Created with IntelliJ IDEA.
 * User: Vladislav
 * Date: 28.10.13
 * Time: 20:37
 * To change this template use File | Settings | File Templates.
 */
public class TestStep {
    private QuestionStructure questionStructure;
    private String userAnswer;
    public TestStep(QuestionStructure newQuestionStructure, String newUserAnswer) {
        questionStructure = newQuestionStructure;
        userAnswer = newUserAnswer;
    }
    public boolean isRightAnswer() {
        if(questionStructure.isRightAnswer(userAnswer)) {
            return true;
        }
        return false;
    }
    public void printToFile(BufferedWriter bufferedWriter) {
        questionStructure.printToFile(bufferedWriter, userAnswer);
    }

}
